package com.derbysoft.lowcostadapter.commons.model;

import com.derbysoft.lowcostadapter.commons.log.Direction;

import javax.persistence.*;
import java.util.Date;

@Entity
@Table(name = "dswitch3_reservation_detail")
public class ReservationDetail extends Base {
    @ManyToOne(fetch = FetchType.LAZY)
    private ReservationLog reservationLog;

    @Enumerated(EnumType.STRING)
    @Column(nullable = false, length = 20)
    private Direction direction;

    @Column(columnDefinition = "longtext")
    private String detail;

    @Temporal(TemporalType.TIMESTAMP)
    private Date timestamp = new Date();

    public Direction getDirection() {
        return direction;
    }

    public void setDirection(Direction direction) {
        this.direction = direction;
    }

    public ReservationLog getReservationLog() {
        return reservationLog;
    }

    public void setReservationLog(ReservationLog reservationLog) {
        this.reservationLog = reservationLog;
    }

    public Date getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Date timestamp) {
        this.timestamp = timestamp;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }
}
